function ShowSongLists(){
    let res = {}; 
    let d = []; 
    var baseurl = MY_URL.split("#")[1];
    var rescode = fetch(baseurl+"?page=1",{});
    var page = istruepages(baseurl);
    d.push({
        title:parseDomForHtml(rescode,"h1,1&&Text"),
        img:parseDom(rescode,".thumb-link,0&&img&&src"),
        desc:parseDomForHtml(rescode,".tags&&Text")+"\n作者："+parseDomForHtml(rescode,".singer-name&&Text")+"\n状态："+getVar("isplayed1","显示歌单"),
        url:'hiker://empty@lazyRule=.js:putVar("isplayed1",getVar("isplayed1","显示歌单") == "显示歌单"?"播放歌曲":"显示歌单");refreshPage();"toast://切换成功"',
        col_type:"movie_1_left_pic"
    },{
        col_type:"line_blank"
    },{
        title:'<span style="color:#88ADA6">&emsp;&emsp;'+ parseDomForHtml(rescode,".intro-details&&Text")+"</span>", 
        col_type:"rich_text"
    },{
        col_type:"line_blank"
    },{
        title:'<span style="color:#F47983">序号&emsp;&emsp;歌曲&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;歌手&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;专辑</span>', 
        col_type:"rich_text"
    },{
        col_type:"line"
    });
    for(let j=1;j<=page;j++){
        rescode = fetch(baseurl+"?page="+j,{});
        var songlist = parseDomForArray(rescode,".songlist-body&&.row");
        if(getVar("isplayed1","显示歌单") == "显示歌单"){
            for(let i=0;i<songlist.length;i++){
                if(parseDomForHtml(songlist[i],".song-name&&a&&href")=="javascript:void(0);"){
                    d.push({
                        title:parseDomForHtml(songlist[i],".song-index&&Text")+"     "+parseDomForHtml(songlist[i],".song-name&&Text")+"     "+parseDomForHtml(songlist[i],".song-singers&&Text")+"\n"+parseDomForHtml(songlist[i],".song-belongs&&Text"),
                        url:"hiker://empty@lazyRule=.js:'toast://没有版权'",
                        col_type:"text_center_1"
                    });
                }else{
                    d.push({
                        title:parseDomForHtml(songlist[i],".song-index&&Text")+"     "+parseDomForHtml(songlist[i],".song-name&&Text")+"     "+parseDomForHtml(songlist[i],".song-singers&&Text")+"\n"+parseDomForHtml(songlist[i],".song-belongs&&Text"),
                        url:"https://music.migu.cn"+parseDomForHtml(songlist[i],".song-name&&a,0&&href")+'@rule=js:var picfun = fetch("https://gitee.com/mofeibai/hiker_info/raw/master/migu/songdetail.js",{});eval(picfun);ShowSongs();',
                        col_type:"text_center_1"
                    });
                }
            }
        }else {
            for(let i=0;i<songlist.length;i++){
                if(parseDomForHtml(songlist[i],".song-name&&a&&href")=="javascript:void(0);"){
                    continue;
                }else{
                    d.push({
                        title:parseDomForHtml(songlist[i],".song-index&&Text")+"     "+parseDomForHtml(songlist[i],".song-name&&Text")+"     "+parseDomForHtml(songlist[i],".song-singers&&Text")+"\n"+parseDomForHtml(songlist[i],".song-belongs&&Text"),
                        url:parseDom(songlist[i],".song-name&&a&&href"),
                        col_type:"text_center_1"
                    });
                }
            }
        }
    }
    d.push({
        title:"““到底了””",
        url:"toast://到底了，不用点了",
        col_type:"text_center_1"
    })
    res.data = d; 
    setHomeResult(res);
}

function istruepages(baseurl){
    for(let i=2;i<10;i++){
        url = baseurl + "?page=" + i;
        pagecode = fetch(url,{});
        songindex = parseDomForHtml(pagecode,".songlist-body&&.row,0&&.song-index&&Text");
        if( Math.ceil(songindex /20)!=i){
            return (i-1);
        }
    }
}

